<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="es">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>ferrocarriles03 Rec2</title>
        <script type="text/javascript" src="./js/jquery-1.6.4.js"></script>
        <script type="text/javascript" src="./js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript" src="./js/jquery.dataTables.min.js"></script>
        <link rel="stylesheet" type="text/css" href="./css/eggplant/jquery-ui-1.8.16.custom.css" />
        <link rel="stylesheet" type="text/css" href="./css/demo_table.css" />
        <script type="text/javascript" src="./js/jquery.bgiframe-2.1.2.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.core.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.mouse.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.button.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.draggable.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.position.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.resizable.js"></script>
	<script type="text/javascript" src="./js/jquery.ui.dialog.js"></script>
	<script type="text/javascript" src="./js/jquery.effects.core.js"></script>
        <script type="text/javascript" src="./js/jquery.ui.tabs.js"></script>
	<link rel="stylesheet" href="./css/demos.css"/>
        
        <script type="text/javascript">
            
            /* TABS */ 
            $(function() {
		$( "#tabs" ).tabs();
            });            
           /* TABS FIN */
            
            
            $(document).ready(function() {
	(function($) {
/*
 * Function: fnGetColumnData
 * Purpose:  Return an array of table values from a particular column.
 * Returns:  array string: 1d data array 
 * Inputs:   object:oSettings - dataTable settings object. This is always the last argument past to the function
 *           int:iColumn - the id of the column to extract the data from
 *           bool:bUnique - optional - if set to false duplicated values are not filtered out
 *           bool:bFiltered - optional - if set to false all the table data is used (not only the filtered)
 *           bool:bIgnoreEmpty - optional - if set to false empty values are not filtered from the result array
 * Author:   Benedikt Forchhammer <b.forchhammer /AT\ mind2.de>
 */
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
	// check that we have a column id
	if ( typeof iColumn == "undefined" ) return new Array();
	
	// by default we only wany unique data
	if ( typeof bUnique == "undefined" ) bUnique = true;
	
	// by default we do want to only look at filtered data
	if ( typeof bFiltered == "undefined" ) bFiltered = true;
	
	// by default we do not wany to include empty values
	if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
	
	// list of rows which we're going to loop through
	var aiRows;
	
	// use only filtered rows
	if (bFiltered == true) aiRows = oSettings.aiDisplay; 
	// use all rows
	else aiRows = oSettings.aiDisplayMaster; // all row numbers

	// set up data array	
	var asResultData = new Array();
	
	for (var i=0,c=aiRows.length; i<c; i++) {
		iRow = aiRows[i];
		var aData = this.fnGetData(iRow);
		var sValue = aData[iColumn];
		
		// ignore empty values?
		if (bIgnoreEmpty == true && sValue.length == 0) continue;

		// ignore unique values?
		else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -1) continue;
		
		// else push the value onto the result data array
		else asResultData.push(sValue);
            }
	
	return asResultData;
}}(jQuery));


function fnCreateSelect( aData ) {    
	var r='<select><option value=""></option>', i, iLen=aData.length;
	for ( i=0 ; i<iLen ; i++ )
	{
		r += '<option value="'+aData[i]+'">'+aData[i]+'</option>';
	}
	return r+'</select>'; 
    }

        
        /* Initialise the DataTable */
            var oTable = $('#tBusqueda').dataTable( {
                "bJQueryUI": true,
                "oLanguage": {                    
                             "oPaginate": {
                                        "sPrevious": "Anterior",
                                        "sNext": "Siguiente",
                                        "sLast": "Ultima",
                                        "sFirst": "Primera"
                                        }, 
                                        
                            "sLengthMenu": 'Mostrar <select>'+
                            '<option value="10">10</option>'+
                            '<option value="20">20</option>'+
                            '<option value="30">30</option>'+
                            '<option value="40">40</option>'+
                            '<option value="50">50</option>'+
                            '<option value="-1">Todos</option>'+
                            '</select> registros',
                            "sInfo": "Mostrando del _START_ a _END_ (Total: _TOTAL_ resultados)",
                            "sInfoFiltered": " - filtrados de _MAX_ registros",
                            "sInfoEmpty": "No hay resultados de búsqueda",
                            "sZeroRecords": "No hay registros a mostrar",
                            "sProcessing": "Espere, por favor...",
                            "sSearch": "Buscar:"
                            },
                "bProcessing": true,
                "sAjaxSource": 'cargatablas.php?cargaen=1'
                } );  
                
                var oTable = $('#tUsuario2').dataTable( {
                "bJQueryUI": true,
                "oLanguage": {                    
                             "oPaginate": {
                                        "sPrevious": "Anterior",
                                        "sNext": "Siguiente",
                                        "sLast": "Ultima",
                                        "sFirst": "Primera"
                                        }, 
                                        
                            "sLengthMenu": 'Mostrar <select>'+
                            '<option value="10">10</option>'+
                            '<option value="20">20</option>'+
                            '<option value="30">30</option>'+
                            '<option value="40">40</option>'+
                            '<option value="50">50</option>'+
                            '<option value="-1">Todos</option>'+
                            '</select> registros',
                            "sInfo": "Mostrando del _START_ a _END_ (Total: _TOTAL_ resultados)",
                            "sInfoFiltered": " - filtrados de _MAX_ registros",
                            "sInfoEmpty": "No hay resultados de búsqueda",
                            "sZeroRecords": "No hay registros a mostrar",
                            "sProcessing": "Espere, por favor...",
                            "sSearch": "Buscar:"
                            },
                "bProcessing": true,
                "sAjaxSource": 'cargatablasUs2.php?cargaen2=1'
                } );
                
                /* Add a select menu for each TH element in the table footer */
               
        $("#example").ajaxComplete(function(){ 
	$("tfoot th").each( function ( i ) {
		this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
		$('select', this).change( function () {
			oTable.fnFilter( $(this).val(), i );
		} );
            });
	}); 
        
     
     
    /*
     * Support functions to provide a little bit of 'user friendlyness' to the textboxes in
     * the footer
     */
    $("tfoot input").each( function (i) {
        asInitVals[i] = this.value;
    } );
     
    $("tfoot input").focus( function () {
        if ( this.className == "search_init" )
        {
            this.className = "";
            this.value = "";
        }
    } );
     
    $("tfoot input").blur( function (i) {
        if ( this.value == "" )
        {
            this.className = "search_init";
            this.value = asInitVals[$("tfoot input").index(this)];
        }
    } );
} );
        
        </script>
        <script type="text/javascript">
                                   
	$(function() {
            // traduccion de calendario deplegable a español
            $.datepicker.regional['es'] = {
		closeText: 'Cerrar',
		prevText: '&#x3c;Ant',
		nextText: 'Sig&#x3e;',
		currentText: 'Hoy',
		monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
		'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
		monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
		'Jul','Ago','Sep','Oct','Nov','Dic'],
		dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado'],
		dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
		dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
		weekHeader: 'Sm',
		dateFormat: 'dd/mm/yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
             $.datepicker.setDefaults($.datepicker.regional['es']);   
             
             });
             
          
        
        //asignacion de calendarios desplegables
        $(document).ready(function() {
                $("#frecepcion").datepicker();
        });
        $(document).ready(function() {
                $("#felevacion").datepicker();
        });
        $(document).ready(function() {
                $("#del").datepicker();
        });
      
        
    </script>
    <script type="text/javascript">	

            $(document).ready(function(){             
                $("#titulo").load("cargatitulo.php?tituloen=1");             
            });
            
            $(document).ready(function(){
                $("#titulo").change(function(event){
                    var id = $("#titulo").find(':selected').val();
                    $("#subtitulo").load('cargasubt.php?id='+id);
                });
            });         
            
    </script>
    <script type="text/javascript">
                     
        function mostrarDiv (it, box) {
           var vis = (box.checked) ? "block" : "none";
           document.getElementById(it).style.display = vis;
        }                   
            
    </script>
               
        
	
        
    </head>
    <body style="background-image: URL(./images/El_Rosarino_de_TBA.jpg)" bgproperties=fixed>
        
        <div>
            
            <div class="ui-widget-header ui-corner-all">
            <h1> Usuario 2 </h1>
            </div>

        <div id="tabs">
            <ul>
		<li><a href="#tabs-1">Entrada</a></li>
		<li><a href="#tabs-2">Busqueda</a></li>
                <li><a href="#tabs-3">Envio</a></li>
		<li><a href="#tabs-4">Usuario</a></li>                
            </ul>
            
            <div id="tabs-1">
                <div class="ui-state-default ui-corner-all">
                    <div style="margin:5px 5px;">    
                        
                        <h2>Ultimas entradas</h2>
                        
                        <table id="tUsuario2" cellpadding="0" cellspacing="0" border="0" class="display">
                             <thead>
                                <tr>
                            <th>Engine</th>
                            <th>Browser</th>
                            <th>Platform</th>
                            <th>Version</th>
                            <th> Grade</th>
                                </tr>
                            </thead>
                            <tbody>
                            </tbody>                    
                        </table>
                        
                        <br/>
                        <h1 style="margin:0 50px;">Formulario</h1>
                        <br/>                        
                        
                        <div id="formId2" title="Formulario 2" style="margin:0 50px;">            
                        <form enctype="multipart/form-data" action="ferro02" method="post">
              
                            <label for="vin_exp">VINCULO - EXP ORIGEN: </label>
                            <input name="vin_exp" id="vin_exp" type="text" maxlength="10" size="10"/>                
                            <br/>
                                
                            <label for="titulo">TITULO: </label>
                            <select id="titulo" name="titulo" id="titulo">
                                <option value="0">Seleccionar</option>		
                            </select>
                
                            <label for="subtitulo">SUBTITULO: </label>
                            <select id="subtitulo" name="subtitulo" id="subtitulo">
                                <option value="0">Seleccionar Titulo</option>                      	
                            </select>                    
                            <br/>   
                    
                            <label for="vin-exp">ASUNTO: <br/> </label>               
                            <textarea rows="6" cols="100" name="asunto" id="asunto"/></textarea>                 
                            <br/>
                
                            <label for="archivo">ARCHIVO </label>
                            <input type="checkbox" name="archivo" id="archivoAct" onClick="mostrarDiv('archivoDat', this)"/>
                            <br/>
                            
                            <div id="archivoDat" style="display:none">
                            <label for="ffep">Fº FEP: </label> 
                            <input name="ffep" id="ffep" type="text" maxlength="6" size="6"/>
                    
                            <label for="ffsr">Fº FSR: </label>
                            <input name="ffsr" id="ffsr" type="text" maxlength="6" size="6"/> 
                    
                            <label for="fallc">Fº ALL-C: </label>
                            <input name="fallc" id="fallc" type="text" maxlength="6" size="6"/> 
                    
                            <label for="fotros">Fº OTROS: </label>
                            <input name="fotros" id="fotros" type="text" maxlength="6" size="6"/> 
                            <br/>
                    
                            <label for="fnca">Fº NCA: </label>
                            <input name="fnca" id="fnca" type="text" maxlength="6" size="6"/> 
                    
                            <label for="fsoe">Fº SOE: </label>
                            <input name="fsoe" id="fsoe" type="text" maxlength="6" size="6"/>
                    
                            <label for="fallm">Fº ALL-M: </label>
                            <input name="fallm" id="fallm" type="text" maxlength="6" size="6"/>
                            </div>
                            <br/><br/>
                        
                            <div align="right">
                            <input name="limpiar" id="limpiar" value="limpiar" type="reset" />
                            <input name="guardar" id="guardar" value="guardar" type="submit" />
                            </div>
              
                        </form>
                        </div >
                        
                    
                        
                    </div> 
               </div> 
            </div>
            
            <div id="tabs-2">
                <div class="ui-state-default ui-corner-all">
                    <div style="margin:5px 5px;">    
                <br/>
                <h1>Informes</h1>
                <br/>
                
                <form enctype="multipart/form-data" action="busqueda" method="post">
                    <label for="campo">Buscar por: </label>
                    <select name="campo" id="act_exp">
			<option value="1">EXP</option>
			<option value="2">ACT</option>			
                    </select>
                    <input name="keyval" id="keyval" type="text" maxlength="10" size="10"/>                 
                    <input name="traerDatos" id="traerDatos" value="Traer Datos" type="submit" />
                </form>
                <br/>
                
                <table id="tBusqueda" cellpadding="0" cellspacing="0" border="0" class="display">
                    <thead>
                        <tr>
                            <th>Engine</th>
                            <th>Browser</th>
                            <th>Platform</th>
                            <th>Version</th>
                            <th> Grade</th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                    <tfoot>
                        <tr>
                            <th>Rendering engine</th>
                            <th>Browser</th>
                            <th>Platform(s)</th>
                            <th>Engine version</th>
                            <th>CSS grade</th>
                        </tr>
                    </tfoot>
                </table>
                    </div>
               </div> 
            </div>
            
            <div id="tabs-3"> 
                
                <h2>ENVIO</h2>
                
            </div>   
                
            <div id="tabs-4">
                <h2>Cambiar contraseña</h2> 
                <div class="ui-state-default ui-corner-all">
                    
                  <form enctype="multipart/form-data" action="nuevoContrasena" method="post">
                      
                    <table style="margin:0 50px;">                    
                    <tbody>
                        <tr>
                            <td>
                                <h3>VIEJA</h3>                                
                            </td>
                            <td> 
                            </td>
                        </tr>
                        <tr>                            
                            <td>
                                <label for="contVieja">Contraseña vieja: </label>
                                
                            </td>
                            <td>
                               <input name="contVieja" id="contVieja" type="password" maxlength="10" size="10"/>  
                            </td>                            
                        </tr>
                        <tr>
                            <td>
                                <h3>NUEVA</h3>                                
                            </td>
                            <td> 
                            </td>    
                        </tr>
                        <tr>
                            <td>
                              <label for="contNueva">Contraseña nueva: </label>  
                            </td>
                            <td>
                               <input name="contNueva1" id="contNueva1" type="password" maxlength="10" size="10"/>   
                            </td>
                        </tr>
                        <tr>
                            <td>
                              <label for="contNueva">Repetir nueva:    </label>  
                            </td>
                            <td>
                               <input name="contNueva2" id="contNueva2" type="password" maxlength="10" size="10"/>  
                            </td>
                        </tr>
                    </tbody>                    
                    </table>   
                    <br/>
                    <input name="aceptar" id="aceptar" value="aceptar" type="submit"  style="margin:0 175px;"/>
                    <br/>
                    <br/>
                    
                  </form>                    
                </div>
                <h2>Salir</h2>
                <form enctype="multipart/form-data" action="salir" method="post">
                    <input name="salir" id="salir" value="Cerrar sesion" type="submit"/>
                </form>
            </div>
        </div>

        </div><!-- End demo -->

    </body>
</html>